package com.project.server.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.project.server.entity.Article;
import com.project.server.vo.dashboard.LatestArticleVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface ArticleMapper extends BaseMapper<Article> {
    long count();
    
    long countByCreateTimeBefore(LocalDateTime dateTime);
    
    List<LatestArticleVO> getLatestArticles(@Param("limit") int limit);
} 